import React from 'react';
import PropTypes from 'prop-types';

import BaseComponent from './baseComponent.js';
import loadingIcon from '../../../assets/images/icon/loading.gif';

class Loading extends BaseComponent {
  constructor(props) {
    super(props);
    this.displayName = 'Loading';
  }

  render() {
    return (
      <div className="loading-wap">
        <img src={loadingIcon} alt="" className="loader" />
      </div>
    );
  }
}

Loading.defaultProps = {
  text: '加载中',
};

Loading.propTypes = {
  text: PropTypes.string,
};

export default Loading;

